////////////////////////////////////////////////////////////////////////////////
//
//  FLYING KIWI BV
//  Copyright 2010 Flying Kiwi BV
//  All Rights Reserved.
//
//  NOTICE: Flying Kiwi permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
////////////////////////////////////////////////////////////////////////////////
package plantool.events {
	//--------------------------------------------------------------------------
	//  Imports
	//--------------------------------------------------------------------------
	import flash.events.Event;
	
	import plantool.modules.orders.data.Orderplanning;
	
	
	//--------------------------------------------------------------------------
	//  [Metadata (Events, Style, Effects etc)]
	//--------------------------------------------------------------------------
	
	//--------------------------------------------------------------------------
	//  Class declaration
	//--------------------------------------------------------------------------
	public class OrderrowEvent extends Event {
		//--------------------------------------------------------------------------
		//Class constants
		//--------------------------------------------------------------------------
		public static const ORDERROWPLANNING_CREATED:String		= "orderrowplanning_created";
		public static const ORDERROWPLANNING_UPDATED:String		= "orderrowplanning_updated";
		
		//--------------------------------------------------------------------------
		//Class variables
		//--------------------------------------------------------------------------
		private var _orderId:uint					= 0;
		private var _orderrowId:uint				= 0;
		private var _workplaceId:uint				= 0;
		private var _date:Date						= null;
		private var _orderPlanning:Orderplanning 	= null;
		
		//--------------------------------------------------------------------------
		//Class properties
		//--------------------------------------------------------------------------
		public function get orderId():uint					{ return _orderId; }
		public function get orderrowId():uint				{ return _orderrowId; }
		public function get workplaceId():uint				{ return _workplaceId; }
		public function get date():Date						{ return _date; }
		public function get orderPlanning():Orderplanning	{ return _orderPlanning; }
		
		//--------------------------------------------------------------------------
		//Constructor and Destructor
		//--------------------------------------------------------------------------
		public function OrderrowEvent(type:String, order_id:uint, orderrow_id:uint, workplace_id:uint = 0, date:Date = null, order_planning:Orderplanning = null, bubbles:Boolean=false, cancelable:Boolean=false) {
			_orderId 		= order_id;
			_orderrowId 	= orderrow_id;
			_workplaceId 	= workplace_id;
			_date			= date;
			_orderPlanning	= order_planning;
			
			super(type, bubbles, cancelable);
		}
		
		//--------------------------------------------------------------------------
		//Class methods
		//--------------------------------------------------------------------------
	}
}